Optimal. Leaf size=224 \[ \frac {x \left (\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {x \left (-\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (\sqrt {b^2-4 a c}+b\right )}+\frac {e^2 x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.48, antiderivative size = 224, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {1424, 1422, 245} \[ \frac {x \left (\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {x \left (-\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (\sqrt {b^2-4 a c}+b\right )}+\frac {e^2 x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 245
Rule 1422
Rule 1424
Rubi steps
\begin {align*} \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx &=\int \left (\frac {e^2}{c}+\frac {c d^2-a e^2+\left (2 c d e-b e^2\right ) x^n}{c \left (a+b x^n+c x^{2 n}\right )}\right ) \, dx\\ &=\frac {e^2 x}{c}+\frac {\int \frac {c d^2-a e^2+\left (2 c d e-b e^2\right ) x^n}{a+b x^n+c x^{2 n}} \, dx}{c}\\ &=\frac {e^2 x}{c}+\frac {\left (2 c d e-b e^2-\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 c}+\frac {\left (2 c d e-b e^2+\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 c}\\ &=\frac {e^2 x}{c}+\frac {\left (2 c d e-b e^2+\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {\left (2 c d e-b e^2-\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (b+\sqrt {b^2-4 a c}\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.52, size = 216, normalized size = 0.96 \[ \frac {x \left (\frac {\left (\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};\frac {2 c x^n}{\sqrt {b^2-4 a c}-b}\right )}{b-\sqrt {b^2-4 a c}}+\frac {\left (-\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c}+b}+e^2\right )}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.89, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {e^{2} x^{2 \, n} + 2 \, d e x^{n} + d^{2}}{c x^{2 \, n} + b x^{n} + a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (e x^{n} + d\right )}^{2}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.04, size = 0, normalized size = 0.00 \[ \int \frac {\left (e \,x^{n}+d \right )^{2}}{b \,x^{n}+c \,x^{2 n}+a}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {e^{2} x}{c} - \int -\frac {c d^{2} - a e^{2} + {\left (2 \, c d e - b e^{2}\right )} x^{n}}{c^{2} x^{2 \, n} + b c x^{n} + a c}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (d+e\,x^n\right )}^2}{a+b\,x^n+c\,x^{2\,n}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (d + e x^{n}\right )^{2}}{a + b x^{n} + c x^{2 n}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________